class WelcomeController < ApplicationController

  def index

  end
  
  def show_add
    if params[:add][:number].include? "single"
      redirect_to :action => 'single'
    else
      redirect_to :action => 'double'
    end
  end
  
    def show_subtr
    if params[:add][:number].include? "single"
      redirect_to :action => 'ssingle'
    else
      redirect_to :action => 'sdouble'
    end
  end
  
  def single
  @a = rand(10)
  @b = rand(10)
  
  
  end
  
  def double
  @a = rand(100)
  @b = rand(100)
  
  end
  
  def ssingle # s for subtraction
  @a = rand(10)
  @b = rand(@a.to_i)
  end
  
  def sdouble
  @a = rand(100)
  @b = rand(@a.to_i)
  end
  

end
